package com.zhengjiang.nacos.storage.controller;

import com.zhengjiang.nacos.storage.model.Storage;
import com.zhengjiang.nacos.storage.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("storage")
public class StorageController {

    @Autowired
    private StorageService storageService;

    @PostMapping("/decry")
    public String decryStorage(@RequestBody Storage storage){
        storageService.decryStorage(storage);
        return "success";
    }
}

